package fun.util.daohelper.hibernate.expression;

import fun.util.daohelper.expression.Equals;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;

/**
 * Author: bin
 * Date: Jan 23, 2006
 * Time: 9:35:52 PM
 */
public class EqualTransformer implements ExpressionCriterionTransformer<Equals> {

    public Criterion transform( Equals startsWith ) {
        return Restrictions.eq( startsWith.getFieldName(), startsWith.getValue() );
    }
}
